Draft
Complete SC5/SV5 round-trip serialization and editor support in ObjectEditor#261
Conversation
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
LeftofZen
September 2, 2026 07:24
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the partial SC5/SV5 implementation to support reliable load/save round-tripping for OpenLoco map files, including packed object chunks and tile-element data. It also fills key S5 structure gaps and wires map-file editing paths needed by the editor UI.
S5 binary model + serializer parity
S5Header + ObjectHeader + encoded payload).TileElement.Write) and switched save logic to emit edited tile elements when available.GameStateSave1/GameStateSave2).S5 structure correctness fixes
ScenarioOptions.LandDistributionPatternsto the correct array shape.Orderssizing tokMaxOrders.S5Headerserializable as a nested loco struct to support chunk-based object serialization paths.Editor behavior
Regression coverage
load -> saveyields byte-identical output.